// PingFloodHunter uses DNS done by chip@amiga.rulez.org (executable must be in c:)
\\ Catch me on IRC: irc.uk.quakenet.eu.org:6667 #AmigaQuake as MellowB ICQ: 48057229
*/
Options Results
PARSE ARG searchip
/* -============================Change the following lines to what u want!============================- */
miamilogfile = 'Miami:MiamiSystem.log' /* Change this to the path of your MiamiSystem logfile. */
usenetinfo = '0' /* Change this if u want to use NetInfo to scan back 1 = Yes 0 = No */
usenetinfoifnohit = '0' /* Change this to scan back even if user is not found on IRC? 1 = Yes 0 = NO */
netinfopath = "Workplace:Online/NetInfo-II/NetInfo" /* Change this to the path of NetInfo on your harddisk with executable at the end! */
notifyuser = '0' /* Change this if u want to tell the flooder that you found him 1 = Yes 0 = No */
notifytext = "Please stop the flood!" /* Change this to what you want to tell the user */
/* -======End of the User changeable part -- Dont change anything below or the script wont work!======- */
AmIRCUserIPIn = 'ram:t/AmIRCUserIPIn'
linecount = '0'
newlinecount = '0'
startout = ''
charnumb = "LENGTH"(searchip)
bold = d2c(2)
IF ( charnumb < '3' ) then SIGNAL MIAMISCAN
IF ( searchip = 'HELP' ) then SIGNAL HELP
IF ( searchip = 'help' ) then SIGNAL HELP; ELSE SIGNAL SCAN
/* Start MiamiSystemLogFile */
MIAMISCAN:
call echo ("Trying to get last IP from MiamiSystemLogFile... Could take a while with large files!")
IF open(file,miamilogfile,'R') then DO
DO UNTIL eof(file)
line = ReadLN(file)
linecount = linecount + '1'
END
close(file)
linecount = linecount - '1'
IF open(file,miamilogfile,'R') then DO
DO UNTIL newlinecount = linecount
line = ReadLn(file)
newlinecount = newlinecount + '1'
END
close(file)
IF line ~= "" then DO
parse var line date' 'time' 'ping' 'flood' 'from' 'IP' 'detected
parse var line date' 'time' 'access' 'from' 'host' 'otherIP' 'to' 'port' 'bla' 'allow
END
END
IF ( line = '' ) then sayerror = "MiamiSystem-logfile not found or errors in log!" & SIGNAL MIAMIERROR; ELSE sayerror = "No Errors found!"
IF ( IP ~= ' ' ) then searchip = IP; ELSE searchip = otherIP
IF ( searchip = 'session' ) then sayerror = "MiamiSystem-logfile not found or errors in log!"
IF ( searchip = 'session' ) then SIGNAL MIAMIERROR
END
startout = "Got IP"bold searchip bold"from MiamiLogFile - PingFlooder Detection started! Could take a while if u are in channels with many users!"
SIGNAL SCAN
EXIT
/* Start Scaning */
SCAN:
options results; "CHANNELS"; allchannels = result
channumb = "WORDS"(allchannels)
chanstart = '1'
userstart = '0'
output = "PingFlooder not on any joined channel!"
IF ( startout = '' ) then startout = "PingFlooder Detection of IP"bold searchip bold"started! Could take a while if u are in channels with many users!"
call echo(startout)
DO UNTIL chanstart = channumb
DO UNTIL userstart = usernumb
options results; "GETUSERS WINNUM="chanstart; allchanusers = result
usernumb = "WORDS"(allchanusers)
options results; "GETUSER" userstart "WINNUM="chanstart; user = result
options results; "USERHOST" user; host = result
parse var host username '@' isp
ADDRESS COMMAND 'c:dns ' isp ' > 'AmIRCUserIPIn
open(file,AmIRCUserIPIn,'R')
IPResult = readln(file)
close(file)
delete(AmIRCUserIPIn)
userstart = userstart + '1'
IF ( userstart > usernumb ) then chanstart = chanstart + '1'
IF ( userstart > usernumb ) then userstart = '0'
IF ( IPResult = searchip ) then output = "IP from"bold User bold"in channel "channameout" and"bold searchip bold"are the same! >>Ping Flooder Found!<<"
options results; "GETCHANNEL WINNUM="chanstart; channame = result
IF ( output ~= "PingFlooder not on any joined channel!" ) then channameout = channame
IF ( IPResult = searchip ) then output = "IP from"bold User bold"in channel "channameout" and"bold searchip bold"are the same! >>Ping Flooder Found!<<"
IF ( IPResult = searchip ) then notifyusername = user
IF ( IPResult = searchip ) then SIGNAL OUTPUT
END
END
SIGNAL OUTPUT
EXIT
/* Help */
HELP:
call echo ("Just enter the IP to search for behind the script or alias name. If u dont enter an IP it will scan your MiamiSystemLogfile for the last IP that scanned or accessed you.")